<?php include _include(ADMIN_PATH.'view/htm/header.inc.htm');?>
<div class="col-lg-12">
	<div class="row">
		<div class="col-lg-4"><p class="m-y-xs text-muted fl"><i class="icon-cog m-r-sm"></i>权限设置<span class="m-l-xs label label-success">v1.1</span></p></div>
	</div>
	
	<form action="<?php echo url("plugin-setting-king_thread_vip");?>" method="post" id="form">
		<div class="form-group row">
			<div class="col-sm-3">
				<?php echo lang('user_group'); ?>
			</div>
			<div class="col-sm-9">
				<input type="text" name="user_group" value="<?php echo $user_group['value'];?>" placeholder="请输入可以加权限的用户组ID，以|分割" class="form-control" />
			</div>
		</div>
		<div class="form-group row">
			<label class="col-sm-2 form-control-label"></label>
			<div class="col-sm-2 m-b-sm" style="margin-left:120px;">
				<button type="submit" class="btn btn-primary btn-block" id="submit" data-loading-text="<?php echo lang('submiting');?>..."><?php echo lang('confirm');?></button>
			</div>
			<div class="col-sm-2 m-b-sm" style="margin-left:120px;">
				<a role="button" class="btn btn-secondary btn-block" href="javascript:history.back();"><?php echo lang('back');?></a>
			</div>
		</div>
	</form>
</div>

<?php include _include(ADMIN_PATH.'view/htm/footer.inc.htm');?>

<script>
var jform = $("#form");
var jsubmit = $("#submit");
var referer = '<?php echo url("plugin-setting-king_thread_vip");?>';
jform.on('submit', function(){
	jform.reset();
	jsubmit.button('loading');
	var postdata = jform.serialize();
	$.xpost(jform.attr('action'), postdata, function(code, message) {
		if(code == 0) {
			$.alert(message);
			jsubmit.text(message).delay(1000).button('reset').location(referer);
		} else {
			$.alert('提交失败');
			jsubmit.button('reset');
		}
	});
	return false;
});
$('#nav_pc li.vip, #nav_mobile li.vip').tab('show');
</script>